package com.rainbow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rainbow.entity.MsgContent;
import com.rainbow.entity.SysMsg;
import com.rainbow.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author rainbow
 **/
public interface SysMsgMapper extends BaseMapper<SysMsg> {

    int sendMsg(MsgContent msg);

    int addMsg2AllHr(@Param("hrs") List<User> hrs, @Param("mid") Long mid);

    List<SysMsg> getSysMsg(@Param("start") int start, @Param("size") Integer size, @Param("hrid") Long hrid);

    int markRead(@Param("flag") Long flag, @Param("hrid") Long hrid);
}
